package org.example.mbg.mapper;


import org.apache.ibatis.annotations.Param;
import org.example.mbg.model.ProductByCart;
import org.springframework.stereotype.Component;

import java.util.List;

/*
购物车多表联查映射接口
 */
@Component
public interface ProductByCartMapper {
    //根据usr_id 查找购物车及商品信息
    List<ProductByCart> selectProductByUserId(Long userId);

    //根据usr_id和product_id查找购物车及商品信息
    List<ProductByCart> selectProductByUserAndProductId(@Param(value = "userId") Long userId, @Param(value = "productId") Long productId);

}
